//
//  OvenDetailViewController.m
//  Fragrance
//
//  Created by mark on 15/6/1.
//  Copyright (c) 2015年 dllo. All rights reserved.
//

#import "OvenDetailViewController.h"
#import <UIImageView+AFNetworking.h>
@interface OvenDetailViewController ()

@end

@implementation OvenDetailViewController

- (void)dealloc
{
    [_dataArray release];
    [_model release];
    [super dealloc];
}

- (void)viewDidLoad {
    [super viewDidLoad];
    
    self.navigationItem.title = @"正餐详情";

    self.view.backgroundColor = [UIColor clearColor];
     
    UIImageView *imageV = [[UIImageView alloc] initWithFrame:CGRectMake(0, 0, self.view.frame.size.width, 500)];
    UIImage *image = [UIImage imageNamed:@"beijingtu6"];
    imageV.image = image;
    
    [self.view addSubview:imageV];
    
    [imageV release];
    
    ovenDTableview = [[UITableView alloc] initWithFrame:CGRectMake(0, 0, self.view.frame.size.width, self.view.frame.size.height - 50)];
    [self.view addSubview:ovenDTableview];
    
    ovenDTableview.delegate = self;
    ovenDTableview.dataSource = self;
    
    [ovenDTableview release];
    
    
}


- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
{
    
        static NSString *indentifier = @"cell";
        OvenDetailTableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:indentifier];
        if (cell == nil) {
            cell = [[OvenDetailTableViewCell alloc] initWithStyle:UITableViewCellStyleSubtitle reuseIdentifier:indentifier] ;
        }
            
            UIImage *image = [UIImage imageNamed:@"beijingtu4"];
            UIImageView *imageview1 = [[UIImageView alloc] initWithImage:image];
            cell.backgroundView = imageview1;
            [imageview1 release];
            cell.selectionStyle = UITableViewCellSelectionStyleNone;
            cell.titleLabel.text = self.model.title;

            cell.yingyangLabel.text = self.model.yingyang;
            [cell.thumbLabel setImageWithURL:[NSURL URLWithString:self.model.thumb] placeholderImage:[UIImage imageNamed:@"jiazaitu"]];
  
        
    return cell;
}

- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section
{
    return 1;
}

- (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath
{
    return 600;
}


- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
